<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>DriveByWire Service</title>
<link href="../Styles/Standard.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table width="100%">
<tr>
<td width="200"><a href="http://www.ProMRDS.com"><img src="../Images/HomeIcon.gif" alt="ProMRDS Home Page" border="0" /></a></td>
<td width="*" align="center"><img src="Images/DriveByWireBanner.gif" alt="DriveByWire" /></td>
</tr>
<tr>
<td colspan="2"><hr /></td>
</tr>
</table>

<div class="page">
<p class="heading"><span class="smallhead">Professional</span><br />&nbsp;&nbsp;&nbsp;Microsoft Robotics Developer Studio<br />
<a href="http://www.ProMRDS.com" onmouseout="Home.src='../Images/Home.gif';" onmouseover="Home.src='../Images/Home_f2.gif';"><img name="Home" src="../Images/Home.gif" width="150" height="25" border="0" alt="Home Page" /></a>
<a href="../ReadMe.htm" onmouseout="Contents.src='../Images/Contents.gif';" onmouseover="Contents.src='../Images/Contents_f2.gif';"><img name="Contents" src="../Images/Contents.gif" width="150" height="25" border="0" alt="Book Contents" /></a>
<a href="ReadMe.htm" onmouseout="ThisChapter.src='../Images/ThisChapter.gif';" onmouseover="ThisChapter.src='../Images/ThisChapter_f2.gif';"><img name="ThisChapter" src="../Images/ThisChapter.gif" width="150" height="25" border="0" alt="This Chapter" /></a>
</p>

<h1>Drive By Wire</h1>

<h2>Purpose</h2>
<p>
The Drive By Wire service was developed specifically for the Compact
Framework (CF). However, in order to do this you must first create a
Desktop version, so there are in fact two services: one for the Desktop
and another for CF, i.e. PDAs.
</p>
<p>
<b>NOTE:</b> To compile the CF version you must have the Professional
Edition of Visual Studio. The Express and Standard Editions do not
support the Compact Framework.
</p>

<h2>Description</h2>

<img src="Images/DriveByWire.jpg" border="0" align="right" hspace="10" vspace="10" alt="Drive By Wire Control Panel" />
<p>
When run as a Desktop service, the DriveByWire service has two windows -
one for controlling a Differential Drive,
and the other for viewing a WebCam. It is very similar to the
<a href="TeleOperation.htm">TeleOperation</a> service.
It can remember where you last placed it on the screen so that it will
always pop up in the same position. The connection parameters are remembered as well.
</p>
<p>
A Compact Framework (CF) version of the service is also available which will run
on a PDA. The main window looks the same, but the CF version does not currently
support a webcam because PDA screens are too small. However, if your PDA has
Bluetooth you can use it to drive many of the available robots that connect
via Bluetooth, such as the Boe-Bot.
</p>
<p>
Some PDAs have a limit on the baud rate that they can support over
Bluetooth. For example, the Dell Axim 50v cannot make Bluetooth connections at
115200 baud. This means that the Drive By Wire service cannot be used with the
LEGO NXT or Hemisson robots on this particular PDA. You should check out your
own PDA to see if it works.
</p>
<p>
Enter the host name and the port number to connect. The first Differential Drive
service and WebCam service that are found on the specified host machine will be used.
Note that the DriveByWire does not automatically connect when you start the service.
This allows you to select the appropriate host, which might be elsewhere on the network.
</p>
<p>
You can use a Joystick, a Gamepad, the arrow keys on the keyboard, or the
on-screen &quot;trackball&quot; to control the robot once you have connected.
When you use the keyboard, the robot will continue to move as long as you hold
down a key. When you release the key, the robot will stop.
On a PDA, the "rocker switch" is equivalent to the four directional
arrow keys. When you release the rocker switch the robot will stop. This makes it easy
to drive with one hand by using your thumb on the rocker switch.
</p>
<p>
There are Motion Control buttons in the bottom-right of the DriveByWire
window that can be used to move the robot. These use the TranslateDistance
and RotateDegrees functions of the Differential Drive. For these to
work, the robot you are driving must implement these operations.
You can adjust the distance and the amount of rotation by changing
the settings.
</p>
<p>
<b>NOTE:</b> To save the settings, you must use a web browser to
view the state of the service. Browse to the following URL when
the service is running:<br />
<a href="http://localhost:50000/DriveByWire">http://localhost:50000/DriveByWire</a><br />
This will only be possible on a PDA if the PDA has WiFi as well as Bluetooth
and the WiFi interface is turned on. A better approach is to edit the config
file directly.
</p>
<p>
When you save the settings, a file called DriveByWire.Config.xml will be written
into the ProMRDS/Config directory. Most of the settings are the same as for the
<a href="TeleOperation.htm">TeleOperation</a> service.
</p>

<h2>Legal Stuff</h2>
<p>
This code is available free of charge for non-commercial use.
Please see the <a href="../Licence.htm">Licence Agreement</a>.
</p>
<p>
This service should not be used for commercial purposes because its operation is not guaranteed.
</p>
</div>

<hr />
<div class="footer">
Page maintained by:
<a href="m&#97;&#105;&#108;t&#111;:webmaster&#64;promrds&#46;com">webmaster&#64;promrds.com</a><br />
Last Updated: Mar-2008
</div>

</body>
</html>
